﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Zjs_Shop.Models;
using Zjs_Shop.Models.Database;

namespace Zjs_Shop.Service
{
    public interface IUserService
    {
       
            // 在接口添加抽象方法 返回值 方法名 参数

            /// <summary>
            /// 
            /// </summary>
            /// <param name="phone"></param>
            /// <returns></returns>

            //根据用户名 从数据库获取用户
            User GetphoneByphone(string phone);
            //根据用户名判断用户是否存在
            /// <summary>
            /// 
            /// </summary>
            /// <param name="Phone"></param>
            /// <returns></returns>
            bool TfUserphone(string Phone);
            //注册
            /// <summary>
            /// 
            /// </summary>
            /// <param ></param>
            /// <param name="Phone"></param>
            /// <param name="Password"></param>
            /// <returns></returns>
            int Reg( string Phone, string Password);
        /// <summary>
        /// 修改用户资料
        /// </summary>
        /// <param name="Id"></param>
        /// <param name="Username"></param>
        /// <param name="Email"></param>
        /// <param name="Address"></param>
        /// <returns></returns>
        List<UserCenter> UserCenter(int userid);
        string Updatauser(int userId, string Username, string Photo, string Address);
        /// <summary>
        /// 新增商品
        /// </summary>
        /// <param name="name"></param>
        /// <param name="price"></param>
        /// <param name="description"></param>
        /// <param name="category_id"></param>
        /// <returns></returns>
        int Addpro(string name, decimal price, string description, int category_id, int stock);
        /// <summary>
        /// 更新商品
        /// </summary>
        /// <param name="Id"></param>
        /// <param name="name"></param>
        /// <param name="price"></param>
        /// <param name="description"></param>
        /// <param name="category_id"></param>
        /// <returns></returns>
        string Updatepro(int Id, string name, decimal price, string description, int category_id, int stock);
        /// <summary>
        /// 根据商品查询商品
        /// </summary>
        /// <param name="Id"></param>
        /// <returns></returns> 
        Product GetProducts(int  Id);
        /// <summary>
        /// 删除商品
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        string DelProduct(int id);
        /// <summary>
        /// 新增分类
        /// </summary>
        /// <param name="CategoryId"></param>
        /// <param name="name"></param>
        /// <returns></returns>
        string AddCategory(int CategoryId, string name);
        /// <summary>
        /// 更新分类
        /// </summary>
        /// <param name="Id"></param>
        /// <param name="CategoryId"></param>
        /// <param name="name"></param>
        /// <returns></returns>
        string UpdateCategory(int Id, int CategoryId, string name);
        /// <summary>
        /// 查询分类
        /// </summary>
        /// <param name="Id"></param>
        /// <returns></returns>
        Category GetCategory(int Id);
        /// <summary>
        /// 删除分类
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        string DelCategory(int id);
        /// <summary>
        /// 
        /// </summary>
        /// <param name="product_id"></param>
        /// <param name="quantity"></param>
        /// <returns></returns>
        GetProResponse GetGoodShow(int CateId, string Keyword, int PageIndex, int PageSize);
        string AddCar(int userid, int product_id);
        //string UpdataACar(int product_id);
        string UpdataCar(int product_id);
        string DelCar(int product_id);
        List<ModelCar> Getcar(int userid);
        //List<ModelOrder> modelOrders(int userid);
        string AddOrder(int userid);
        //string AddOdetail(int userid);
        List<ModelOrder> modelOrders(int userid);
        List<ModelBsg> ModelBsg();
        string BsgSend(int id, string expcom, string expressid);
    }
}
